/*
 * @Author: jares
 * @Date: 2024-02-29 16:52:48
 * @LastEditors: jares
 * @LastEditTime: 2025-05-26 13:50:06
 * @Description:
 *
 * Copyright (c) 2024 by jares, All Rights Reserved.
 */
import './static/css/style.css'
import line from './packages/line/index'
import bar from './packages/bar/index'
import pie from './packages/pie/index'
// 存储组件列表
const components = [line, bar, pie]
/* 
  定义install 方法，接收Vue作为参数，如果使用use注册插件，则所有的组件都将被注册
*/
const install = (Vue) => {
	// 判断是否安装
	if (install.installed) {
		return
	}
	// 遍历所有组件
	components.map((item) => {
		Vue.component(item.name, item)
	})
}
//判断Vue初始化
if (typeof window !== 'undefined' && window.Vue) {
	install(window.Vue)
}

export default {
	install,
	line
}
